package com.icss.service;

import com.icss.domian.PageBean;
import com.icss.domian.QueryVO;
import com.icss.domian.VehicleIllegalRecord;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;

import javax.transaction.Transactional;
import java.sql.SQLException;
import java.util.List;

public interface RecordService {

    List<VehicleIllegalRecord> findAll(PageRequest pageable);

    /**
     * 查询违法记录
     * @return
     */
    List<QueryVO> findQueryVO();

    /**
     * 分页查询1
     * @param pageable
     * @return
     */

    Page<QueryVO> findPage(Pageable pageable);
    /**
     * 分页查询2
     * @param currentPage
     * @param count
     * @return
     */
    PageBean selectPageBean(int currentPage, int count) throws SQLException;



    Integer countAllPage();


    /*
    * 条件查询:按车牌号模糊查询，完成按违法开始时间和违法结束时间执行时间区间查询功能
    *
    * */
    List<QueryVO> findByTimeAndCordLicense(String beginTime,String endTime,String RecordLicense);


    /*
    * 更新违法数据
    * */
    @Transactional
    void  updateIllegalItem(Integer userId,Integer illegalItemId,String illegalRecordTime,
                         String  illegalRecordLicense,String illegalRecordAddress);
    /*
    *更新车牌号
    * */
    @Transactional
    void  updateRecordLicenseByUserId(Integer userId,String  illegalRecordLicense);

    @Transactional
    void  updateIllegalRecordStatusById(Integer illegalRecordId);

}
